/**
 * 
 */
package com.david.cms.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.david.basic.dao.BaseDao;
import com.david.cms.model.Role;

/**
 * @description
 * @author David
 * @version 2013-5-4
 */
@Repository("roleDao")
public class RoleDao extends BaseDao<Role> implements IRoleDao {

	public void deleteRoleUsers(int rid) {
		this.updateByHql("delete UserRole ur where ur.role.id=?",rid);
	}

	public List<Role> listRole() {
		return this.list("from Role");
	}

}

